#pragma once
#include "TcpServer.h"
#include "Threadpool.h"

class Server
{
public:
    Server(int threadNums, int threadTaskQueueSize, string ip, unsigned short port);
    void start();
    void stop();

private:
    void _onConnection(TcpConnectionPtr conn);
    void _onMessage(TcpConnectionPtr conn);
    void _onClose(TcpConnectionPtr conn);
    Threadpool _threadpool;
    TcpServer _tcpServer;
    

};

